from manim import *


class AddScene(Scene):
    def construct(self):
        text1 = Text("动态添加动画特效")
        text2 = Text("添加: 字段1")
        text3 = Text("添加: 字段2")
        texts = VGroup(text1, text2, text3).arrange(DOWN)
        rect = SurroundingRectangle(texts, buff=0.5)

        self.play(
            Create(rect, run_time=3.0),
            Succession(
                Wait(3),
                Add(text1),
                Wait(1),
                Add(text2, text3),
            ),
        )
        self.wait()
